package cn.org.mrliu.ssm.qq.config;

public class QQConfig {
	private static QQConfig config = new QQConfig();
	private Integer sendInterval = 2000; // 发送间隔
	private String qqApi; // QQAPI接口路径
	private Integer connectTimeout = 5; // HTTP连接超时,默认为5秒
	private Integer readTimeout = 5; // HTTP读取超时,默认为5秒
	private String encoding = "UTF-8";// 消息内容编码
	private Integer queueMaxSize = 1000;// 消息队列最大值

	public static QQConfig getInstance() {
		return config;
	}

	public Integer getSendInterval() {
		return sendInterval;
	}

	public void setSendInterval(Integer sendInterval) {
		this.sendInterval = sendInterval;
	}

	public String getQqApi() {
		return qqApi;
	}

	public void setQqApi(String qqApi) {
		this.qqApi = qqApi;
	}

	public Integer getConnectTimeout() {
		return connectTimeout;
	}

	public void setConnectTimeout(Integer connectTimeout) {
		this.connectTimeout = connectTimeout;
	}

	public Integer getReadTimeout() {
		return readTimeout;
	}

	public void setReadTimeout(Integer readTimeout) {
		this.readTimeout = readTimeout;
	}

	public String getEncoding() {
		return encoding;
	}

	public void setEncoding(String encoding) {
		this.encoding = encoding;
	}

	public Integer getQueueMaxSize() {
		return queueMaxSize;
	}

	public void setQueueMaxSize(Integer queueMaxSize) {
		this.queueMaxSize = queueMaxSize;
	}

	@Override
	public String toString() {
		return "Config [sendInterval=" + sendInterval + ", qqApi=" + qqApi + ", connectTimeout=" + connectTimeout
				+ ", readTimeout=" + readTimeout + ", encoding=" + encoding + ", queueMaxSize=" + queueMaxSize + "]";
	}
}
